<template>
  <div class="bg-efef">
    <van-search v-model="search" placeholder="请输入搜索关键词" />
    <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
      <van-swipe-item >
        <img src="https://img.bosszhipin.com/beijin/upload/image/20191225/719b5568228bda8229408e1401457f13.jpg?x-oss-process=image/format,jpg" alt="">
      </van-swipe-item>
      <van-swipe-item >
        <img src="https://img.bosszhipin.com/beijin/upload/image/20191225/f1ab4555112c48503c7fdd8712531102.jpg?x-oss-process=image/format,jpg" alt="">
      </van-swipe-item>
    </van-swipe>
    <div class="bg-fff overflow">
      <van-divider
        :style="{ color: '#000', borderColor: '#d8d8d8', padding: '0 60px' }"
      >
        推荐活动
      </van-divider>
    </div>
    <div class="activity bg-fff m-b-15">
      <div class="act" v-for="(item,index) in actList" :key="index">
        <img :src="item.poster" alt="">
        <h3>{{item.title}}</h3>
        <p>{{item.intro}}</p>
      </div>
    </div>
    <div class="bg-fff overflow">
      <van-divider
        :style="{ color: '#000', borderColor: '#d8d8d8', padding: '0 60px' }"
      >
        热门岗位
      </van-divider>
    </div>
    <div class="bg-fff overflow">
      <!-- <job-item is-border v-for="item in 6" :key="item"></job-item> -->
    </div>
  </div>
</template>

<script>
  import JobItem from '../components/JobItem.vue'
  import request from '../utils/request'
  export default {
  components: { JobItem },
    data() {
      return {
        actList: [],
        search:''
      }
    },
    created () {
      request.get('/activity').then(res=>{
        console.log(res);
        this.actList = res.data.data
      })
    },
  }
</script>

<style lang="less" scoped>
.my-swipe .van-swipe-item {
  color: #fff;
  font-size: 20px;
  text-align: center;
  // background-color: #39a9ed;
  img{
    width: 100%;
  }
}
.activity{
  display: flex;
  flex-wrap:wrap;
  padding:0 3rem 3rem;
  .act{
    width: 33rem;
    &:nth-of-type(2n-1){
      margin-right: 3rem;
    }
    margin-bottom: 5rem;
  }
  img{
    width: 33rem;
    height: 20rem;
  }
  h3{
    font-size: 2.8rem;
    margin-top: 2rem;
  }
  p{
    font-size: 2.4rem;
    margin-top: 1.4rem;
  }
}
</style>